sql = "DELETE FROM luMetro" & _ " WHERE " & _ "CityID = " & to_sql(CityID,"number") & ""
'response.write sql
on error resume next
cn.Execute(sql)
if err.number <> 0 then
b_error = true
end if
on error goto 0
end sub
sub db_select_view_luMetro
view_luMetro_sql = "SELECT " & _ "CityID, " & _ "MajorCity, " & _ "State FROM luMetro" & _ ""
if request("sortby") <> "" AND inStr(lcase(view_luMetro_sql),"order by") = 0 then view_luMetro_sql = view_luMetro_sql + " ORDER BY " & request("sortby")
error_list.add "delete_view_lumetro", "Specify record to delete."
end if
end select
' no action was specified, so handle the default case(s)
if CityID <> "" then
db_select_edit_lumetro
end if
db_select_view_lumetro
%>
This is the admistation area for the ''luMetro" lookup table. This table could be used to manage and orgranize information (links,conent,classifieds) by major metropolotian areas. This could also be used to create drop-down lists of the metro areas.
<% if CityID = "" then %><input type=submit name=insert_button value=insert> <% end if %>
<% if CityID <> "" then %><input type=submit name=delete_button value=delete onclick="document.edit_luMetro.action.value = 'delete_edit_luMetro'"> <% end if %>
<% if CityID <> "" then %><input type=submit name=update_button value=update><% end if %>
</td>
<input type=hidden name="action" value="<% if CityID <> "" then %>update<% else %>insert<%end if %>_edit_luMetro"></tr>